package com.example.android_app.database.channel;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.example.android_app.database.table.User;

import java.util.List;

@Dao
public interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    public void insertUser(User... users);

    @Update
    public void updateUser(User... users);

    @Delete
    public void deleteUser(User... users);

    @Query("select * from users where username = :username")
    public List<User>getUser(String username);
}
